<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'新建日报'))}
	<div class="frame">
		<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   >
			<input type="hidden" id="ajax" name="ajax" value="0">
			<input type="hidden" id="folder" name="folder" value="{$folder}">
			<input type="hidden" id="fid" name="fid" value="{$folder}">
			<input type="hidden" id="opmode" name="opmode" value="add">
			<div class="box">
				<label class="input-label" for="name">标题*：</label>
				<input class="input" type="text" id="name" name="name" check='required' info='请输入标题' >
			</div>
			<div class="box">
				<label class="input-label" for="name">日期*：</label>
				<input class="input input-date" type="text" id="work_date" name="work_date" check='required' info='请输入日期' readonly="readonly">
			</div>
			<div class="box">
				<label class="input-label" for="name">内容：</label>
				<textarea class="simple" id="content" name="content" style="width:100%;height:300px;" check="required" info="请输入内容"></textarea>
			</div>
			<div class="box">
				<label class="input-label" for="name">附件：</label>
				<div class="input-block">
					{:widget('file_upload/add')}
				</div>
			</div>
			<div class="box">
				<label class="input-label" for="name"></label>
				<a class="btn btn-normal" onclick="save()">保存</a>
				<a class="btn btn-return" onclick="go_return_url()">取消</a>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global', 'editor'], function() {
			var $ = layui.jquery;
			var fn = {
				save : function() {
					send_form('form_data', '{:url("save")}', '', function(ret) {
						if (ret.status == 1) {
							layer.msg(ret.info, {
								time : 1200
							}, function() {
								go_return_url();
							});
						} else {
							layer.msg(ret.info);
							return false;
						};
					});
				}
			};
			win_exp(fn);
		});

	</script>
</block>